package com.dd.test;

public class StringTest1 {
	
	public static void main(String[] args){
		String s = new String("abc");
		String s1 = "abc";
		
		String s2 = new String("abc");
		
		System.out.println(s==s1);
		System.out.println(s==s2);
		System.out.println(s1==s2);
		
		System.out.println("--------------------------------");
		
		System.out.println(s == s.intern());//false
		System.out.println(s1 == s1.intern());//true
		System.out.println(s1.intern()==s2.intern());//true
		
	}

}
